# Maintainer: David Runge <dave@sleepmap.de>
_name=PyRSS2Gen
pkgname=python-pyrss2gen
pkgver=1.1
pkgrel=15
pkgdesc="Generate RSS2 using a Python data structure"
arch=('any')
url="http://www.dalkescientific.com/Python/PyRSS2Gen.html"
license=('BSD')
depends=('python')
makedepends=('python-setuptools')
# pypi source doesn't contain LICENSE
#source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
source=("http://www.dalkescientific.com/Python/${_name}-${pkgver}.tar.gz")
sha512sums=('2240686914c87984626eb739676927fcd53488158bdebf589e07e8a778e6d24305964e032581c61836f0fabc1264e42d05c88eac8f4c5f6536c31c775434ce02')

build() {
  cd "${_name}-$pkgver"
  python setup.py build
}

package() {
  cd "${_name}-$pkgver"
  python setup.py install --skip-build \
    --optimize=1 \
    --prefix=/usr \
    --root="${pkgdir}"
  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -vDm 644 README -t "${pkgdir}/usr/share/doc/${pkgname}"
}
